import { createRouter, createWebHistory } from 'vue-router'
import HomeView from '../views/HomeView.vue'

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: '/',
      name: 'home',
      component: HomeView,
    },
    {
      path: '/about',
      name: 'about',
      // route level code-splitting
      // this generates a separate chunk (About.[hash].js) for this route
      // which is lazy-loaded when the route is visited.
      component: () => import('../views/AboutView.vue'),
    },
    {
      path: '/registration-slip',
      name: 'registration-slip',
      component: () => import('../views/RegistrationSlipView.vue'),
    },
    {
      path: '/outpatient-slip',
      name: 'outpatient-slip',
      component: () => import('../views/OutpatientSlipView.vue'),
    },
    {
      path: '/inpatient-slip',
      name: 'inpatient-slip',
      component: () => import('../views/InpatientSlipView.vue'),
    },
    {
      path: '/department-management',
      name: 'department-management',
      component: () => import('../views/DepartmentManagementView.vue'),
    },
    {
      path: '/employee-add',
      name: 'employee-add',
      component: () => import('../views/EmployeeAddView.vue'),
    },
    {
      path: '/permission-management',
      name: 'permission-management',
      component: () => import('../views/PermissionManagementView.vue'),
    },
  ],
})

export default router
